<template>
  <div>
    <el-switch
      :key="item.id"
      v-for="(item) in tableData"
      v-model="item.value"
      :active-value="true"
      :inactive-value="false"
      @change="hChange">
    </el-switch>
  </div>
</template>
<script>
export default {
  components: {},
  data() {
    return {
      tableData: [
        {
          id: 1,
          title: "憨憨1",
          value: true,
        },
        {
          id: 2,
          title: "憨憨2",
          value: false,
        },
        {
          id: 3,
          title: "憨憨3",
          value: true,
        },
      ],
    };
  },
  methods: {
    hChange:function(value){
      console.log(value);
    }
  },
};
</script>
<style>
</style>